Skip to content

geotiff: forward photometric through VRT writer (#1861)#1864

Merged
brendancol merged 1 commit into
mainfrom
issue-1861
May 14, 2026
Merged

geotiff: forward photometric through VRT writer (#1861)#1864
brendancol merged 1 commit into
mainfrom
issue-1861

Conversation

@brendancol
Copy link
Copy Markdown
Contributor

Summary

Test plan

  • New test verifies photometric='miniswhite' produces tile TIFFs with PhotometricInterpretation = 0.
  • Control test confirms default photometric='auto' still produces PhotometricInterpretation = 1.
  • Existing VRT writer tests still pass.

to_geotiff(..., '.vrt', photometric=...) used to drop the kwarg
between _write_vrt_tiled and _write_single_tile; the per-tile TIFFs
are now tagged with the requested PhotometricInterpretation.
@github-actions github-actions Bot added the performance PR touches performance-sensitive code label May 14, 2026
@brendancol brendancol requested a review from Copilot May 14, 2026 18:08
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Forwards the photometric kwarg from to_geotiff through the VRT writer path so per-tile TIFFs honor the requested PhotometricInterpretation tag (fixes #1861).

Changes:

  • Add photometric parameter to _write_vrt_tiled and _write_single_tile, forwarding to write(...).
  • Pass photometric through the to_geotiff_write_vrt_tiled dispatch.
  • Add regression tests verifying miniswhite and default auto produce the expected Photometric tag on per-tile TIFFs.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
xrspatial/geotiff/init.py Thread photometric through VRT writer dispatch and per-tile write calls.
xrspatial/geotiff/tests/test_vrt_writer_photometric_1861.py New regression tests asserting per-tile PhotometricInterpretation matches the request.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@brendancol brendancol merged commit c7371c1 into main May 14, 2026
16 checks passed
@brendancol brendancol deleted the issue-1861 branch May 15, 2026 04:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance PR touches performance-sensitive code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

geotiff: to_geotiff('.vrt', photometric=...) silently drops the photometric kwarg

2 participants